package com.simple.javatraining.testing.examinator;

import com.simple.javatraining.testing.io.InputOutput;
import com.simple.javatraining.testing.testinside.answers.Answer;
import com.simple.javatraining.testing.testinside.questions.Question;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class Examinator {

    public void showTaskToUser(Question question) {
        askOneQuestion(question);
        question.proposeVariantsOfAnswer();
        question.printHint();
    }

    public void askOneQuestion(Question question) {
        InputOutput.outputMessageToConsole(question.getTextOfQuestion());
    }

    public static Set<Answer> deleteSameAnswers(final List<Answer> usersAnswer) {
        Set<Answer> processedUsersAnswer = new HashSet<Answer>(usersAnswer);
        return processedUsersAnswer;
    }
}

